import type { ExtensibleEntityDto, ExtensibleObject } from '@abp/ng.core';
import type { DocumentStatus } from '../core/document-status.enum';
import type { SupplierDto } from '../suppliers/models';
import type { OperatorDto } from '../staff/models';
import type { AuxiliaryUnitDto, ItemMasterDto } from '../item-masters/models';
import type { WarehouseDto } from '../storage/models';

export interface ReceivementCreateDto extends ReceivementCreateOrUpdateBase {
  children: ReceivementLineCreateOrUpdateDto[];
}

export interface ReceivementCreateOrUpdateBase extends ExtensibleObject {
  tenantId?: string;
  orderTypeId?: string;
  supplierId?: string;
  operatorId?: string;
  arriveDate?: string;
  mark?: string;
  code?: string;
  businessDate?: string;
  documentStatus: DocumentStatus;
  sourceType?: string;
  sourceKey?: string;
  sourceCreatedOn?: string;
  isDeleted: boolean;
  deleterId?: string;
  deletionTime?: string;
  lastModificationTime?: string;
  lastModifierId?: string;
  creationTime?: string;
  creatorId?: string;
}

export interface ReceivementDocumentDto extends ExtensibleEntityDto<string> {
  tenantId?: string;
  orderType: ReceivementTypeDto;
  supplierId?: string;
  supplier: SupplierDto;
  operatorId?: string;
  operator: OperatorDto;
  arriveDate?: string;
  mark?: string;
  code?: string;
  businessDate?: string;
  documentStatus: DocumentStatus;
  sourceType?: string;
  sourceKey?: string;
  sourceCreatedOn?: string;
  isDeleted: boolean;
  deleterId?: string;
  deletionTime?: string;
  lastModificationTime?: string;
  lastModifierId?: string;
  creationTime?: string;
  creatorId?: string;
}

export interface ReceivementDto extends ExtensibleEntityDto<string> {
  tenantId?: string;
  orderTypeId?: string;
  orderType: ReceivementTypeDto;
  supplierId?: string;
  supplier: SupplierDto;
  operatorId?: string;
  operator: OperatorDto;
  arriveDate?: string;
  mark?: string;
  code?: string;
  businessDate?: string;
  documentStatus: DocumentStatus;
  sourceType?: string;
  sourceKey?: string;
  sourceCreatedOn?: string;
  isDeleted: boolean;
  deleterId?: string;
  deletionTime?: string;
  lastModificationTime?: string;
  lastModifierId?: string;
  creationTime?: string;
  creatorId?: string;
  children: ReceivementLineDto[];
  concurrencyStamp?: string;
}

export interface ReceivementLineCreateOrUpdateDto extends ExtensibleObject {
  id?: string;
  documentId?: string;
  itemMasterId?: string;
  itemCode?: string;
  itemName?: string;
  itemSpec?: string;
  quantity: number;
  shipmentQuantity: number;
  unitId?: string;
  unitPrice: number;
  warehouseId?: string;
  batch?: string;
  lineNo: number;
  sourceType?: string;
  sourceKey?: string;
  sourceCreatedOn?: string;
  lastModificationTime?: string;
  lastModifierId?: string;
  creationTime?: string;
  creatorId?: string;
}

export interface ReceivementLineDto extends ExtensibleEntityDto<string> {
  documentId?: string;
  document: ReceivementDocumentDto;
  itemMasterId?: string;
  itemMaster: ItemMasterDto;
  itemCode?: string;
  itemName?: string;
  itemSpec?: string;
  quantity: number;
  shipmentQuantity: number;
  unitId?: string;
  unit: AuxiliaryUnitDto;
  unitPrice: number;
  warehouseId?: string;
  warehouse: WarehouseDto;
  batch?: string;
  lineNo: number;
  sourceType?: string;
  sourceKey?: string;
  sourceCreatedOn?: string;
  lastModificationTime?: string;
  lastModifierId?: string;
  creationTime?: string;
  creatorId?: string;
  concurrencyStamp?: string;
}

export interface ReceivementTypeCreateDto extends ReceivementTypeCreateOrUpdateBase {
}

export interface ReceivementTypeCreateOrUpdateBase extends ExtensibleObject {
  tenantId?: string;
  displayName?: string;
  code?: string;
  sourceType?: string;
  sourceKey?: string;
  sourceCreatedOn?: string;
  isDeleted: boolean;
  deleterId?: string;
  deletionTime?: string;
  lastModificationTime?: string;
  lastModifierId?: string;
  creationTime?: string;
  creatorId?: string;
}

export interface ReceivementTypeDto extends ExtensibleEntityDto<string> {
  tenantId?: string;
  displayName?: string;
  code?: string;
  sourceType?: string;
  sourceKey?: string;
  sourceCreatedOn?: string;
  isDeleted: boolean;
  deleterId?: string;
  deletionTime?: string;
  lastModificationTime?: string;
  lastModifierId?: string;
  creationTime?: string;
  creatorId?: string;
  concurrencyStamp?: string;
}

export interface ReceivementTypeUpdateDto extends ReceivementTypeCreateOrUpdateBase {
  concurrencyStamp?: string;
}

export interface ReceivementUpdateDto extends ReceivementCreateOrUpdateBase {
  concurrencyStamp?: string;
  children: ReceivementLineCreateOrUpdateDto[];
}
